package de.oszimtcc.timetableservices;

import de.oszimtcc.framework.Logger;
import de.oszimtcc.timetable.TimetableApplication;
import de.oszimtcc.timetable.TimetableBaseScreen;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

public class OnBootReceiver extends BroadcastReceiver 
{
	static int request_code = 19051986;
	
	@Override
	public void onReceive(Context context, Intent intent) 
	{
		Toast.makeText(context, "OnBoot empfangen", Toast.LENGTH_LONG).show();
		Logger.Debug("OnReceive got intent : " + intent.toString() + "["+context+"]");
		Intent serviceIntent = new Intent(context,TimetableBaseScreen.class);
		serviceIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		//serviceIntent.setAction("de.oszimtcc.timetable.TimetableService");
		context.startService(serviceIntent);
	}
}
